3.52 \(\int \sec ^4(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx\)

Optimal. Leaf size=30 \[ \frac{\tan ^3(c+d x) (a \cot (c+d x)+b)^3}{3 b d} \]

[Out]

((b + a*Cot[c + d*x])^3*Tan[c + d*x]^3)/(3*b*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0464568, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.071, Rules used = {3088, 37} \[ \frac{\tan ^3(c+d x) (a \cot (c+d x)+b)^3}{3 b d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^4*(a*Cos[c + d*x] + b*Sin[c + d*x])^2,x]

[Out]

((b + a*Cot[c + d*x])^3*Tan[c + d*x]^3)/(3*b*d)

Rule 3088

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> -Dist[d^(-1), Subst[Int[(x^m*(b + a*x)^n)/(1 + x^2)^((m + n + 2)/2), x], x, Cot[c + d*x]], x] /; FreeQ[
{a, b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] &&  !(GtQ[n, 0] && GtQ[m, 1])

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rubi steps

\begin{align*} \int \sec ^4(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{(b+a x)^2}{x^4} \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac{(b+a \cot (c+d x))^3 \tan ^3(c+d x)}{3 b d}\\ \end{align*}

Mathematica [A]  time = 0.0404834, size = 46, normalized size = 1.53 \[ \frac{a^2 \tan (c+d x)}{d}+\frac{a b \tan ^2(c+d x)}{d}+\frac{b^2 \tan ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^4*(a*Cos[c + d*x] + b*Sin[c + d*x])^2,x]

[Out]

(a^2*Tan[c + d*x])/d + (a*b*Tan[c + d*x]^2)/d + (b^2*Tan[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Maple [A]  time = 0.103, size = 48, normalized size = 1.6 \begin{align*}{\frac{1}{d} \left ({a}^{2}\tan \left ( dx+c \right ) +{\frac{ab}{ \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+{\frac{{b}^{2} \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{3\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4*(a*cos(d*x+c)+b*sin(d*x+c))^2,x)

[Out]

1/d*(a^2*tan(d*x+c)+a*b/cos(d*x+c)^2+1/3*b^2*sin(d*x+c)^3/cos(d*x+c)^3)

________________________________________________________________________________________

Maxima [A]  time = 1.0484, size = 61, normalized size = 2.03 \begin{align*} \frac{b^{2} \tan \left (d x + c\right )^{3} + 3 \, a^{2} \tan \left (d x + c\right ) - \frac{3 \, a b}{\sin \left (d x + c\right )^{2} - 1}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*(a*cos(d*x+c)+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/3*(b^2*tan(d*x + c)^3 + 3*a^2*tan(d*x + c) - 3*a*b/(sin(d*x + c)^2 - 1))/d

________________________________________________________________________________________

Fricas [A]  time = 0.463329, size = 131, normalized size = 4.37 \begin{align*} \frac{3 \, a b \cos \left (d x + c\right ) +{\left ({\left (3 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right )} \sin \left (d x + c\right )}{3 \, d \cos \left (d x + c\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*(a*cos(d*x+c)+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/3*(3*a*b*cos(d*x + c) + ((3*a^2 - b^2)*cos(d*x + c)^2 + b^2)*sin(d*x + c))/(d*cos(d*x + c)^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4*(a*cos(d*x+c)+b*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.16747, size = 55, normalized size = 1.83 \begin{align*} \frac{b^{2} \tan \left (d x + c\right )^{3} + 3 \, a b \tan \left (d x + c\right )^{2} + 3 \, a^{2} \tan \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*(a*cos(d*x+c)+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/3*(b^2*tan(d*x + c)^3 + 3*a*b*tan(d*x + c)^2 + 3*a^2*tan(d*x + c))/d